﻿/*
 * This file is part of SmartProxy <https://github.com/salarcode/SmartProxy>,
 * Copyright (C) 2022 Salar Khalilzadeh <salar2k@gmail.com>
 *
 * SmartProxy is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * SmartProxy is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with SmartProxy.  If not, see <http://www.gnu.org/licenses/>.
 */
html {
	font-size: 15px;
}

html.popup {
	font-size: 13px;
}

html.popup body {
	min-width: 210px;
}

.slogan {
	font-weight: bold;
	color: navy;
}
/* 
	TODO: firefox doesn't support `color-schema` css fully yet
	@media (prefers-color-scheme: dark) {
	.slogan {
		color: white;
	}
} */
.font-url {
	font-family: Segoe UI, Courier New, Courier, monospace;
}

.rtl {
	font-family: Tahoma, sans-serif;
}

body.rtl {
	text-align: right;
}

.rtl .jsgrid-align-left {
	direction: ltr;
}

.rtl .nav {
	padding-right: 0;
}

.rtl .modal-footer > :not(:first-child) {
	margin-left: 0;
	margin-right: 0.25rem;
}

.rtl .modal-header .close {
	margin: -1rem auto -1rem -1rem;
}

.direction-ltr {
	direction: ltr;
}

.fullwidth {
	width: 100%;
}

.wordwrap-anywhere {
	word-wrap: anywhere;
}

.text-break-word {
	word-break: break-word;
}

.whitespace-nowrap {
	white-space: nowrap;
}

input[type='file'].form-control {
	height: auto;
}

input:invalid {
	border: rgba(255, 0, 0, 0.5) 1px solid;
}

.background-white {
	background-color: white;
}

.nav li {
	cursor: pointer;
}

.nav-pills > a.active .fa,
.nav-pills > a.active .fab,
.nav-pills > a.active .fas,
.nav-pills > a.active .far {
	color: white !important;
}

.nav-link.nav-smart-profile {
	margin-left: 20px;
	border-left: 2px solid rgb(228, 255, 245);
	width: auto;
}

.rtl .nav-link.nav-smart-profile {
	margin-left: 0;
	margin-right: 20px;
	border-left: 0;
	border-right: 2px solid rgb(228, 255, 245);
}

.form-text.text-muted {
	margin-top: 0.1rem;
	margin-bottom: 0.25rem;
}

.subdomains-list.subdomains-list {
	-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

.has-list-with-muted-help li > small {
	color: gray;
}
.form-switch .form-check-input {
	border-radius: 2em;
}
.fa-stack.fa-stack-no-margin {
	margin: -6px -6px 0 -6px;
	transform: scale(0.9);
}
.text-left {
	/* Needed for DataTables which hasn't migrated properly */
	text-align: end !important;
}
.text-right {
	/* Needed for DataTables which hasn't migrated properly */
	text-align: end !important;
}
.float-left {
	/* Needed for DataTables which hasn't migrated properly */
	float: left !important;
}
.float-right {
	/* Needed for DataTables which hasn't migrated properly */
	float: right !important;
}
div.dataTables_scrollBody {
	/* Needed for DataTables  */
	border-left: 0px !important;
}
hr {
	color: rgb(100, 100, 100);
}
.vertical-align-middle {
	vertical-align: middle;
}

.list-style-type-check {
	list-style-type: '\2705';
}

.alert a {
	color: inherit;
}

.rtl .alert-dismissible .btn-close {
	right: auto;
}

.cursor-move {
	cursor: move;
}
.cursor-pointer {
	cursor: pointer;
}

button:disabled {
	/*Allowing display of tooltip on disabled buttons*/
	pointer-events: auto !important;
	cursor: default !important;
}

/* ============================== */
/* Settings page styles */
/* ------------------------------ */

@media (max-width: 576px) {
	.container > .row {
		/* Mobile fix on bootstrap */
		margin: 0 auto;
	}

	.container > .row > div {
		/* Mobile fix on bootstrap */
		padding-left: 0;
		padding-right: 0;
	}
}

.backup-buttons {
	min-width: 180px;
}
#tabSettingsOffCanvas {
	width: 300px;
}
#tabSettingsOffCanvas .offcanvas-body {
	overflow: auto;
}
#tabSettings .nav-link {
	min-width: 160px;
}
#tabSettings .nav-link .fa,
#tabSettings .nav-link .fas,
#tabSettings .nav-link .fa-stack {
	width: 23px;
	text-align: center;
}
#tabSettings .nav-link .fa-stack {
	margin: 0;
}

.position-sticky-bottom {
	position: sticky;
	bottom: -1px;
	background: white;
}
.sticky-save-buttons-bar {
	position: relative;
	bottom: -1px;
	background: white;
	padding: 10px 5px 15px;
	border-radius: 5px;
}
.sticky-save-buttons-bar::after {
	content: '';
	position: absolute;
	z-index: -1;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
	border-radius: 50%;

	top: 10px;
	left: 15%;
	right: 15%;
	height: 20%;
	width: 70%;
}

.diag {
	font-size: xx-small;
	opacity: 0.2;
	cursor: default;
}
/* 
	TODO: firefox doesn't support `color-schema` css fully yet
	@media (prefers-color-scheme: dark) {
	.position-sticky-bottom {
		background-color: rgb(32, 34, 34);
	}
	.sticky-save-buttons-bar {
		background-color: rgb(32, 34, 34);
	}
	.sticky-save-buttons-bar::after {
		box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 30px;
	}
} */
.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.8);
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
}
@media (prefers-color-scheme: dark) {
	.overlay {
		background: rgba(0, 0, 0, 0.8);
	}
}
.delayed3seconds {
	opacity: 0;
	animation: delayed3secondsFrames 1s ease-in-out forwards;
	animation-delay: 3s;
}
@keyframes delayed3secondsFrames {
	to {
		opacity: 1;
	}
}
/* ============================== */

/* popup menu styles */

/* ------------------------------ */

.popup-container {
	display: table;
	width: 100%;
}

.popup-menu-contents {
	display: table-cell;
	vertical-align: top;
	min-width: 200px;
}

.proxyable-item .proxyable-is-subscription {
	display: block;
	font-size: 0.7em;
	line-height: 7pt;
	padding: 0 20px;
	margin: 0;
}
.popup-menu-failed {
	display: table-cell;
	vertical-align: top;
	border-right: solid 1px silver;
	min-width: 260px;
}

.popup-menu-failed .failed-requests-box {
	background: white;
	-ms-border-radius: 5px;
}

.failed-requests-box .failed-request-container {
	overflow: auto;
	max-height: 300px;
}

.failed-requests-box .request-box {
	display: block;
	white-space: nowrap;
	vertical-align: middle;
	position: relative;
	margin-top: 2px;
}

.failed-requests-box .request-box.request-box-dependant {
	margin-top: 6px;
	margin-left: -8px;
}

.failed-requests-box .request-box .request-name {
	display: inline-block;
	max-width: 250px;
	margin-rightxxxx: 25px;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
}

.failed-requests-box .request-box .request-name input {
	margin: 0;
	vertical-align: middle;
	padding: 0;
}

.failed-requests-box .request-box .request-name .fas {
	margin: 0 5px;
}

.failed-requests-box .request-box .badge-container {
	display: inline-block;
	position: absolute;
	right: 0;
	top: 4px;
}
.private-browsing-mode-head {
	background: var(--bs-info);
	color: var(--bs-gray-100);
	background-image: none;
	padding: 4px 4px;
	border-radius: 10px 10px 0 0;
	margin: 0;
}
.proxy-profiles-incognito-mode {
	padding: 4px 0;
	border-radius: 0 0 10px 10px;
	background: var(--bs-info);
	margin: 0;
}
.proxy-profiles-incognito-mode a {
	margin: 2px 5px;
	border-radius: 5px;
	width: auto;
	color: var(--bs-gray-100);
}

.proxy-profiles-incognito-mode a:not(.active):hover {
	color: var(--bs-info);
}
/* ============================== */
/* Proxyable page styles */
/* ------------------------------ */
.grid-vertical-align-middle td {
	vertical-align: middle;
}
.grid-ellipsis-text-cell {
	position: relative;
}
.grid-ellipsis-text-link {
	position: absolute;
	margin: 2px 2px 0 0;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	/* display: inline-block; */
	width: 92%;
}
.grid-status-col-text .grid-ellipsis-text-link {
	margin: 6px 2px 0 0;
}
.grid-col-nowrap {
	font-size: 0.7rem;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}
.grid-status-col-text {
	font-size: 0.7rem;
}
.grid-status-col-text .grid-col-maxwidth-100 {
	display: inline-block;
	max-width: 100px;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

/* Affiliate Ad Box Styles */
.affiliate-ad-box {
	position: relative;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 1px solid #dee2e6;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
}

.affiliate-ad-box:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.affiliate-ad-label {
	position: absolute;
	top: 8px;
	right: 12px;
	background: rgba(108, 117, 125, 0.3);
	color: #fff;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 10px;
	text-transform: uppercase;
	font-weight: 500;
	letter-spacing: 0.5px;
}

.affiliate-ad-content {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
}

.affiliate-ad-content:hover {
	text-decoration: none;
	color: inherit;
}

.affiliate-ad-icon {
	width: 48px;
	height: 48px;
	margin-right: 16px;
	border-radius: 8px;
	flex-shrink: 0;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	position: relative;
	overflow: hidden;
}

.affiliate-ad-favicon {
	width: 32px;
	height: 32px;
	object-fit: contain;
	display: block;
	z-index: 2;
}

.affiliate-ad-fallback {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #007bff;
	color: #fff;
	font-size: 24px;
	border-radius: 8px;
	z-index: 1;
}

/* Fallback will show behind the image, and if image fails to load it becomes visible */

.affiliate-ad-text {
	flex: 1;
}

.affiliate-ad-title {
	font-size: 16px;
	font-weight: 600;
	color: #495057;
	margin: 0 0 4px 0;
	line-height: 1.3;
}

.affiliate-ad-description {
	font-size: 14px;
	color: #6c757d;
	margin: 0;
	line-height: 1.4;
}

/* Dark theme support */
.theme-dark .affiliate-ad-box {
	background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
	border-color: #495057;
	color: #e9ecef;
}

.theme-dark .affiliate-ad-box:hover {
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.theme-dark .affiliate-ad-icon {
	background: #495057;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-dark .affiliate-ad-title {
	color: #e9ecef;
}

.theme-dark .affiliate-ad-description {
	color: #adb5bd;
}

.theme-dark .affiliate-ad-label {
	background: rgba(173, 181, 189, 0.3);
	color: #212529;
}

@media (prefers-color-scheme: dark) {
	.theme-auto .affiliate-ad-box {
		background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
		border-color: #495057;
		color: #e9ecef;
	}

	.theme-auto .affiliate-ad-box:hover {
		box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
	}

	.theme-auto .affiliate-ad-icon {
		background: #495057;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	}

	.theme-auto .affiliate-ad-title {
		color: #e9ecef;
	}

	.theme-auto .affiliate-ad-description {
		color: #adb5bd;
	}

	.theme-auto .affiliate-ad-label {
		background: rgba(173, 181, 189, 0.3);
		color: #212529;
	}
}

/* Proxyable Domain Panel Styles */
.proxyable-arrow-btn {
	border: none;
	outline: none;
	box-shadow: none;
	padding: 2px 6px;
	margin: 0px -5px 0px 4px;
	min-width: auto;
	transition: transform 0.2s ease;
}

.proxyable-arrow-btn:hover {
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 3px;
}

.proxyable-arrow-btn:focus {
	outline: none;
	box-shadow: none;
}

.proxyable-panel {
	margin: 0;
	overflow: hidden;
	background: #f8f9fa;
	border-top: 1px solid #dee2e6;
	padding: 10px;
}

.proxyable-panel .form-control-sm {
	font-size: 0.8rem;
	padding: 0.25rem 0.5rem;
}

.proxyable-panel label {
	font-weight: 500;
	margin-bottom: 3px;
}

@media (prefers-color-scheme: dark) {
	.theme-auto .proxyable-panel {
		background: #343a40 !important;
		border-color: #495057 !important;
	}

	.theme-auto .proxyable-arrow-btn:hover {
		background-color: rgba(255, 255, 255, 0.1) !important;
	}
}
